import React from 'react'
import {
    View, Image
} from '@tarojs/components'
import Taro from '@tarojs/taro';
export default function ProList({ prolist }) {
    return (
        <>
            {prolist.map(item => {
                return (<View style={{
                    display: 'flex',
                    padding: 10
                }} key={item.proid}
                    onClick={() => {
                        console.log('被点击了' + item.proid);
                        Taro.navigateTo({
                            url: '/pages/detail/detail?proid=' + item.proid
                        })
                    }}
                >
                    <Image style={{
                        width: 80,
                        height: 80,
                    }} src={item.img1} />
                    <View style={{
                        flex: 1,
                        paddingLeft: 10,
                        fontSize: 14
                    }}>{item.proname}</View>
                </View>)
            })}
        </>
    )
}
